package com.sky.controller;

import com.sky.dto.SkuReductionDTO;
import com.sky.service.SmsSkuFullReductionService;
import com.sky.utils.R;
import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/skuFullReduction")
public class SmsSkuFullReductionController {

    @Resource
    private SmsSkuFullReductionService smsSkuFullReductionService;

    @PostMapping("/addSkuReduction")
    public R addSkuReduction(@RequestBody SkuReductionDTO skuReductionDTO){
        boolean flag = smsSkuFullReductionService.addSkuReduction(skuReductionDTO);
        return flag ? R.ok() : R.error();
    }
}
